<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>OptionsPricing: DynamicSolverBase.py Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">OptionsPricing
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dir_ecbb14687e1bcdda1258b79279264b64.html">models</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">DynamicSolverBase.py</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">#!/usr/bin/python</span>
<a name="l00002"></a>00002 <span class="comment"># -*- coding: utf-8 -*-</span>
<a name="l00003"></a>00003 
<a name="l00004"></a>00004 <span class="comment"># Copyright (c) 2011</span>
<a name="l00005"></a>00005 <span class="comment">#</span>
<a name="l00006"></a>00006 <span class="comment"># Permission is hereby granted, free of charge, to any person obtaining a</span>
<a name="l00007"></a>00007 <span class="comment"># copy of this software and associated documentation files (the &quot;Software&quot;),</span>
<a name="l00008"></a>00008 <span class="comment"># to deal in the Software without restriction, including without limitation</span>
<a name="l00009"></a>00009 <span class="comment"># the rights to use, copy, modify, merge, publish, distribute, sublicense,</span>
<a name="l00010"></a>00010 <span class="comment"># and/or sell copies of the Software, and to permit persons to whom the</span>
<a name="l00011"></a>00011 <span class="comment"># Software is furnished to do so, subject to the following conditions:</span>
<a name="l00012"></a>00012 <span class="comment">#</span>
<a name="l00013"></a>00013 <span class="comment"># The above copyright notice and this permission notice shall be included in</span>
<a name="l00014"></a>00014 <span class="comment"># all copies or substantial portions of the Software.</span>
<a name="l00015"></a>00015 <span class="comment">#</span>
<a name="l00016"></a>00016 <span class="comment"># THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span>
<a name="l00017"></a>00017 <span class="comment"># IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span>
<a name="l00018"></a>00018 <span class="comment"># FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span>
<a name="l00019"></a>00019 <span class="comment"># AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span>
<a name="l00020"></a>00020 <span class="comment"># LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span>
<a name="l00021"></a>00021 <span class="comment"># OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span>
<a name="l00022"></a>00022 <span class="comment"># SOFTWARE.</span>
<a name="l00023"></a>00023 <span class="comment">#</span>
<a name="l00024"></a>00024 <span class="comment"># Author: Jesus Carrero &lt;j.o.carrero@gmail.com&gt;</span>
<a name="l00025"></a>00025 <span class="comment"># Mountain View, CA</span>
<a name="l00026"></a>00026 <span class="comment">#</span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="stringliteral">&quot;&quot;&quot;</span>
<a name="l00029"></a>00029 <span class="stringliteral">Use by Time steppers as base class.</span>
<a name="l00030"></a>00030 <span class="stringliteral">&quot;&quot;&quot;</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="keyword">import</span> logging
<a name="l00033"></a>00033 
<a name="l00034"></a>00034 
<a name="l00035"></a><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html">00035</a> <span class="keyword">class </span><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html">DynamicSolverBase</a>(object):
<a name="l00036"></a>00036 
<a name="l00037"></a>00037     <span class="stringliteral">&quot;&quot;&quot;</span>
<a name="l00038"></a>00038 <span class="stringliteral">    Base class for:</span>
<a name="l00039"></a>00039 <span class="stringliteral">    1.- convection-reaccion diffusion</span>
<a name="l00040"></a>00040 <span class="stringliteral">    2.- partial-integro differential equation.</span>
<a name="l00041"></a>00041 <span class="stringliteral">    &quot;&quot;&quot;</span>
<a name="l00042"></a>00042 
<a name="l00043"></a>00043     __slots__ = [
<a name="l00044"></a>00044         <span class="stringliteral">&#39;m_dolog&#39;</span>,
<a name="l00045"></a>00045         <span class="stringliteral">&#39;m_lbc&#39;</span>,
<a name="l00046"></a>00046         <span class="stringliteral">&#39;m_load&#39;</span>,
<a name="l00047"></a>00047         <span class="stringliteral">&#39;m_logger&#39;</span>,
<a name="l00048"></a>00048         <span class="stringliteral">&#39;m_rbc&#39;</span>,
<a name="l00049"></a>00049         <span class="stringliteral">&#39;m_tstepper&#39;</span>,
<a name="l00050"></a>00050         <span class="stringliteral">&#39;m_ivalf&#39;</span>,
<a name="l00051"></a>00051         ]
<a name="l00052"></a>00052 
<a name="l00053"></a><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a51d957064f856115780d4ff9e79a1acf">00053</a>     <span class="keyword">def </span><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a51d957064f856115780d4ff9e79a1acf">__init__</a>(self):
<a name="l00054"></a>00054         <span class="stringliteral">&quot;&quot;&quot;</span>
<a name="l00055"></a>00055 <span class="stringliteral">      m_lbc ~ Boundary term, left hand side</span>
<a name="l00056"></a>00056 <span class="stringliteral">      m_rbc ~ Boundary term, right hand side</span>
<a name="l00057"></a>00057 <span class="stringliteral">      m_ivalf ~ initial condition (function)</span>
<a name="l00058"></a>00058 <span class="stringliteral">    &quot;&quot;&quot;</span>
<a name="l00059"></a>00059 
<a name="l00060"></a>00060         (self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#aff9a143d6a941e9e8a93b907107f6935">m_lbc</a>, self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#acc01e119eaef44d2a6f0da581c2cffbc">m_rbc</a>) = (<span class="keywordtype">None</span>, <span class="keywordtype">None</span>)
<a name="l00061"></a>00061         (self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#aad4d89257e87d999c362439f13e32abd">m_load</a>, self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a356781bba7910c7527a51a6c34421e3f">m_dolog</a>) = (<span class="keywordtype">None</span>, <span class="keywordtype">None</span>)
<a name="l00062"></a>00062         (self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a2bba676a7abe2ef04f8159760318b70a">m_ivalf</a>, self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#abb0974b3afe3f8c809aee6bc5246b9c5">m_tstepper</a>) = (<span class="keywordtype">None</span>, <span class="keywordtype">None</span>)
<a name="l00063"></a>00063         self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a66d8c22bbcd116f317196c34092667d4">m_logger</a> = logging.getLogger(<span class="stringliteral">&#39;self.m_logger&#39;</span>)
<a name="l00064"></a>00064 
<a name="l00065"></a>00065     <span class="keyword">def </span>_get_solver_hist(self):
<a name="l00066"></a>00066         <span class="stringliteral">&quot;&quot;&quot; get solver history. &quot;&quot;&quot;</span>
<a name="l00067"></a>00067 
<a name="l00068"></a>00068         <span class="keywordflow">if</span> self.m_tstepper.keep_history():
<a name="l00069"></a>00069             <span class="keywordflow">return</span> self.m_tstepper.get_history()
<a name="l00070"></a>00070         <span class="keywordflow">else</span>:
<a name="l00071"></a>00071             <span class="keywordflow">raise</span> Warning(<span class="stringliteral">&#39;Calling get hist when not hist was kept is illigal.&#39;</span>)
<a name="l00072"></a>00072 
<a name="l00073"></a><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#aa9987a5fa5cd99a2a388870455cdd4fd">00073</a>     <span class="keyword">def </span><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#aa9987a5fa5cd99a2a388870455cdd4fd">do_log</a>(self):
<a name="l00074"></a>00074         <span class="stringliteral">&quot;&quot;&quot; log progresses. &quot;&quot;&quot;</span>
<a name="l00075"></a>00075 
<a name="l00076"></a>00076         <span class="keywordflow">return</span> self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a356781bba7910c7527a51a6c34421e3f">m_dolog</a>
<a name="l00077"></a>00077 
<a name="l00078"></a><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a54002dd78832189cb686a03762d4b3e7">00078</a>     <span class="keyword">def </span><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a54002dd78832189cb686a03762d4b3e7">get_ivalf</a>(self):
<a name="l00079"></a>00079         <span class="stringliteral">&quot;&quot;&quot; initial value. &quot;&quot;&quot;</span>
<a name="l00080"></a>00080 
<a name="l00081"></a>00081         <span class="keywordflow">return</span> self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a2bba676a7abe2ef04f8159760318b70a">m_ivalf</a>
<a name="l00082"></a>00082 
<a name="l00083"></a><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#ae3182266b48a041bbc0f2104f61208ac">00083</a>     <span class="keyword">def </span><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#ae3182266b48a041bbc0f2104f61208ac">get_keep_hist</a>(self):
<a name="l00084"></a>00084         <span class="stringliteral">&quot;&quot;&quot; get flag keep history. &quot;&quot;&quot;</span>
<a name="l00085"></a>00085 
<a name="l00086"></a>00086         <span class="keywordflow">if</span> self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#abb0974b3afe3f8c809aee6bc5246b9c5">m_tstepper</a> <span class="keywordflow">is</span> <span class="keywordtype">None</span>:
<a name="l00087"></a>00087             <span class="keywordflow">print</span> <span class="stringliteral">&#39;set time stepper before getting the hist flag&#39;</span>
<a name="l00088"></a>00088             <span class="keyword">assert</span> <span class="keyword">False</span>
<a name="l00089"></a>00089 
<a name="l00090"></a>00090         <span class="keywordflow">return</span> self.m_tstepper.keep_history()
<a name="l00091"></a>00091 
<a name="l00092"></a><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a35b28e1e3a189276dd0038fccc9268ff">00092</a>     <span class="keyword">def </span><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a35b28e1e3a189276dd0038fccc9268ff">get_lbc</a>(self):
<a name="l00093"></a>00093         <span class="stringliteral">&quot;&quot;&quot; left boundary condition. this is a function (x, t). &quot;&quot;&quot;</span>
<a name="l00094"></a>00094 
<a name="l00095"></a>00095         <span class="keywordflow">return</span> self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#aff9a143d6a941e9e8a93b907107f6935">m_lbc</a>
<a name="l00096"></a>00096 
<a name="l00097"></a><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a15f8712dee743b0c3a225414eed41d68">00097</a>     <span class="keyword">def </span><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a15f8712dee743b0c3a225414eed41d68">get_load</a>(self):
<a name="l00098"></a>00098         <span class="stringliteral">&quot;&quot;&quot; this terms shows up as mass forces. &quot;&quot;&quot;</span>
<a name="l00099"></a>00099 
<a name="l00100"></a>00100         <span class="keywordflow">return</span> self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#aad4d89257e87d999c362439f13e32abd">m_load</a>
<a name="l00101"></a>00101 
<a name="l00102"></a><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#ad8b5a0ea71eed65b89d5c74d17ac8462">00102</a>     <span class="keyword">def </span><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#ad8b5a0ea71eed65b89d5c74d17ac8462">get_rbc</a>(self):
<a name="l00103"></a>00103         <span class="stringliteral">&quot;&quot;&quot; right boundary condition. this is a function (x, t). &quot;&quot;&quot;</span>
<a name="l00104"></a>00104 
<a name="l00105"></a>00105         <span class="keywordflow">return</span> self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#acc01e119eaef44d2a6f0da581c2cffbc">m_rbc</a>
<a name="l00106"></a>00106 
<a name="l00107"></a><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#ae973a3438aedc957e64738a6f5082c05">00107</a>     <span class="keyword">def </span><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#ae973a3438aedc957e64738a6f5082c05">get_tstepper</a>(self):
<a name="l00108"></a>00108         <span class="stringliteral">&quot;&quot;&quot; return a pointer to the time stepper class. &quot;&quot;&quot;</span>
<a name="l00109"></a>00109 
<a name="l00110"></a>00110         <span class="keywordflow">if</span> self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#abb0974b3afe3f8c809aee6bc5246b9c5">m_tstepper</a> <span class="keywordflow">is</span> <span class="keywordtype">None</span>:
<a name="l00111"></a>00111             self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#acc16ccc8523d48e6977a06567a2faa02">log_error</a>(<span class="stringliteral">&#39;Set a time stepper for the diffusion problem&#39;</span>)
<a name="l00112"></a>00112             self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#acc16ccc8523d48e6977a06567a2faa02">log_error</a>(<span class="stringliteral">&#39;use the API set_time_stepper( )&#39;</span>)
<a name="l00113"></a>00113             <span class="keywordflow">raise</span> ValueError
<a name="l00114"></a>00114 
<a name="l00115"></a>00115         <span class="keywordflow">return</span> self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#abb0974b3afe3f8c809aee6bc5246b9c5">m_tstepper</a>
<a name="l00116"></a>00116 
<a name="l00117"></a><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#acc16ccc8523d48e6977a06567a2faa02">00117</a>     <span class="keyword">def </span><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#acc16ccc8523d48e6977a06567a2faa02">log_error</a>(self, msgh):
<a name="l00118"></a>00118         <span class="stringliteral">&quot;&quot;&quot; call this function from super classes to log messages. &quot;&quot;&quot;</span>
<a name="l00119"></a>00119 
<a name="l00120"></a>00120         self.m_logger.error(msgh)
<a name="l00121"></a>00121 
<a name="l00122"></a><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a4141866dee2e70412fd76362aea82729">00122</a>     <span class="keyword">def </span><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a4141866dee2e70412fd76362aea82729">log_info</a>(self, msgh):
<a name="l00123"></a>00123         <span class="stringliteral">&quot;&quot;&quot; call this function from super classes to log messages. &quot;&quot;&quot;</span>
<a name="l00124"></a>00124 
<a name="l00125"></a>00125         self.m_logger.info(msgh)
<a name="l00126"></a>00126 
<a name="l00127"></a><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a472bd168524af9ae5878293019ff9cc6">00127</a>     <span class="keyword">def </span><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a472bd168524af9ae5878293019ff9cc6">set_constraint</a>(self, constraint):
<a name="l00128"></a>00128         <span class="stringliteral">&quot;&quot;&quot; set linear complementary constraint.&quot;&quot;&quot;</span>
<a name="l00129"></a>00129 
<a name="l00130"></a>00130         self.m_tstepper.set_constraint(constraint)
<a name="l00131"></a>00131 
<a name="l00132"></a><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#abf04760a997411599978581da0f7f26a">00132</a>     <span class="keyword">def </span><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#abf04760a997411599978581da0f7f26a">set_dolog</a>(self, dolog):
<a name="l00133"></a>00133         <span class="stringliteral">&quot;&quot;&quot; log progress ??? &quot;&quot;&quot;</span>
<a name="l00134"></a>00134 
<a name="l00135"></a>00135         self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a356781bba7910c7527a51a6c34421e3f">m_dolog</a> = dolog
<a name="l00136"></a>00136 
<a name="l00137"></a><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a1de54d2b1cfbb9f1f9204f65d320cf85">00137</a>     <span class="keyword">def </span><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a1de54d2b1cfbb9f1f9204f65d320cf85">set_ivalf</a>(self, ivalf):
<a name="l00138"></a>00138         <span class="stringliteral">&quot;&quot;&quot; set solution at time 0. &quot;&quot;&quot;</span>
<a name="l00139"></a>00139 
<a name="l00140"></a>00140         self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a2bba676a7abe2ef04f8159760318b70a">m_ivalf</a> = ivalf
<a name="l00141"></a>00141 
<a name="l00142"></a><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a1baa6903eda5cfb8db459b30a0bc6ae1">00142</a>     <span class="keyword">def </span><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a1baa6903eda5cfb8db459b30a0bc6ae1">set_lbc</a>(self, left_bc):
<a name="l00143"></a>00143         <span class="stringliteral">&quot;&quot;&quot; set left boundary condition. &quot;&quot;&quot;</span>
<a name="l00144"></a>00144 
<a name="l00145"></a>00145         self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#aff9a143d6a941e9e8a93b907107f6935">m_lbc</a> = left_bc
<a name="l00146"></a>00146 
<a name="l00147"></a><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a25cabf4fbf2ced1e3a7d24f266e30064">00147</a>     <span class="keyword">def </span><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a25cabf4fbf2ced1e3a7d24f266e30064">set_load</a>(self, load):
<a name="l00148"></a>00148         <span class="stringliteral">&quot;&quot;&quot; gravity terms. &quot;&quot;&quot;</span>
<a name="l00149"></a>00149 
<a name="l00150"></a>00150         self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#aad4d89257e87d999c362439f13e32abd">m_load</a> = load
<a name="l00151"></a>00151 
<a name="l00152"></a><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#aac6a3e685510ccb3d89ef8c76bc3d4dc">00152</a>     <span class="keyword">def </span><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#aac6a3e685510ccb3d89ef8c76bc3d4dc">set_rbc</a>(self, right_bc):
<a name="l00153"></a>00153         <span class="stringliteral">&quot;&quot;&quot; set right boundary condition. &quot;&quot;&quot;</span>
<a name="l00154"></a>00154 
<a name="l00155"></a>00155         self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#acc01e119eaef44d2a6f0da581c2cffbc">m_rbc</a> = right_bc
<a name="l00156"></a>00156 
<a name="l00157"></a><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a3204e00ef1f98b7cec313c880f458ec0">00157</a>     <span class="keyword">def </span><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#a3204e00ef1f98b7cec313c880f458ec0">set_time_stepper</a>(self, time_stepper):
<a name="l00158"></a>00158         <span class="stringliteral">&quot;&quot;&quot; set time stepper.&quot;&quot;&quot;</span>
<a name="l00159"></a>00159 
<a name="l00160"></a>00160         self.<a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#abb0974b3afe3f8c809aee6bc5246b9c5">m_tstepper</a> = time_stepper
<a name="l00161"></a>00161 
<a name="l00162"></a><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#ad3fbb3b8c0ddb52b146dee57735eb6b5">00162</a>     <span class="keyword">def </span><a class="code" href="classmodels_1_1DynamicSolverBase_1_1DynamicSolverBase.html#ad3fbb3b8c0ddb52b146dee57735eb6b5">solve</a>(self):
<a name="l00163"></a>00163         <span class="stringliteral">&quot;&quot;&quot; solve pde &quot;&quot;&quot;</span>
<a name="l00164"></a>00164 
<a name="l00165"></a>00165         <span class="keywordflow">raise</span> NotImplementedError, <span class="stringliteral">&#39;pure virtual method&#39;</span>
<a name="l00166"></a>00166 
<a name="l00167"></a>00167 
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Thu Dec 22 2011 05:17:53 for OptionsPricing by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
